<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        //字符串运算符
    var color='blue';
    var str='The sky is'+color;
    var tel=110+'120';
    console.log(str);//输出结果为：The sky is blue
    console.log(tel);//输出结果为：10120
    console.log(typeof str,typeof tel)//输出结果为：string string
    //赋值运算
    var num1=2,num2='2';
    num1+=3;
    num2+=3;
    console.log(num1,num2);//输出结果为：5“23”
    //三元运算符
    var age=prompt('请输入需要判断的年龄：');
    var status=age>=18?'已成年':'未成年';
    //多分支语句
    if(score>=90){
        console.log('优秀');
    }else if(score>=80){
        console.log('良好');
    }else if(score>=70){
        console.log('中等');
    }else if(score>=60){
        console.log('及格');
    }else {
        console.log('不及格');
    }
    //swith语句
    switch(parseInt (score/10)){
        case 10://90~100为优
        case 9:console.log('优');break;
        case 8:console.log('良');break;
        default:console.log('差');
    }
       </script>
</head>
<body>
    
</body>
</html>

 